package svc.elib.analysis;

import java.io.IOException;

import svc.elib.db.Database;
import svc.elib.socnet.EvolutionarySnapshots;
import svc.elib.socnet.Net;
import svc.elib.socnet.SocConstructor;

public class ElibEvolution2 {
	
	private Net[] snaps;
	private int startYear;
	
	public ElibEvolution2(Net net) {
		EvolutionarySnapshots es = new EvolutionarySnapshots(net);
		startYear = es.getStartYear();
		snaps = es.getSnapshots();
	}
	
	public void analyze() {
		for (int i = 0; i < snaps.length; i++) {
			Net cSnap = snaps[i];
			int year = startYear + i;
			
			int nonIsolated = cSnap.getNumNodes() - cSnap.getNumIsolated();
			int oldNodes = determineOldNodes(cSnap);
			int newNodes = nonIsolated - oldNodes;
			int numLinks = cSnap.getNumLinks();
		}
	}
	
	private int determineOldNodes(Net net) {
		
		return 0;
	}
	
	public static void main(String[] args) 
		throws IOException
	{
		Database db = new Database("eLibData.csv", 1932, 2011);
		System.out.println(db.info());
		SocConstructor soc = new SocConstructor(db);
		Net net = soc.getNet();
	}
	
	

}
